
export interface UserProps {
  isLogin?: boolean;
  nickName?: string;
  _id?: string;
  column?: string;
  email?: string;
  avatar?: imageData;
  description?: string;
}
export interface ColumnProps {
  _id: string;
  title: string;
  avatar?: imageData;
  description: string;
}
export interface imageData {
  _id?: string;
  url?: string;
  createdAt?: string;
  fitUrl?: string;
}
export interface ItemProps {
  _id?: string;
  title: string;
  excerpt?: string;
  content?: string;
  image?: imageData;
  createdAt?: string;
  column: string;
  isHTML?: boolean;
  avatar?: string
}
export interface ColumnItemProps {
  list: ItemProps[];
  author: UserProps;
}
export interface ArticalProps {
  _id?: string;
  title: string;
  content?: string;
  excerpt?: string;
  isHTML?: boolean;
  author?: UserProps;
  column?: string;
  image?: imageData;
  updatedAt?: string;
  createdAt?: string
}
interface ListProps<P> {
  [id: string]: P;
}
export interface GlobalDataProps {
  loading: boolean;
  user: UserProps;
  columns: { data: ColumnProps[]; currentPage: number; count: number };
  columnItems: ColumnItemProps;
  artical: ArticalProps;
  token?: string;
  error: GlobalErrorProps;

}
export interface GlobalErrorProps {
  status: boolean;
  message?: string
}

export interface ResponseType<P = {}> {
  code: number;
  msg: string;
  data: P;
}